package com.itbaizhan.test.b;

/**
 * 测试多态
 */
public class Animal {
    public void shout(){
        System.out.println("叫一声");
    }
}
//继承
class Dog extends Animal {
    //方法重写
    public void shout(){
        System.out.println("旺旺！");
    }
    public void seedDoor(){
        System.out.println("看门中。。。");
    }
}
class Cat extends Animal {
    public void shout(){
        System.out.println("喵喵喵");
    }
}
